package net.boot.smpp.listener.impl;

import lombok.extern.slf4j.Slf4j;
import org.jsmpp.extra.SessionState;
import org.jsmpp.session.SMPPServerSession;
import org.jsmpp.session.Session;
import org.jsmpp.session.SessionStateListener;

/**
 * @author qiusu
 * @since  2025/08/18
 */
@Slf4j
public class SessionStateListenerImpl implements SessionStateListener {
    @Override
    public void onStateChange(SessionState newState, SessionState oldState, Session source) {
        SMPPServerSession session = (SMPPServerSession)source;
        log.info("New state of session {} is {}" , session.getSessionId(), newState);
    }
}